
using System;
using System.Drawing;
using System.Windows.Forms;

namespace hkgoldenhighlight
{
	public partial class Prompt : Form
	{
		public Prompt(string Title, string Text, string DefaultText)
		{
			InitializeComponent();
			
			this.Text = Title;
			this.label1.Text = Text;
			this.textBox1.Text = DefaultText;
		}
		
		private string Msg;
		
		private void button1_Click(object sender, EventArgs e)
        {
            Msg = textBox1.Text;
        }
 
        public string GetMsg()
        {
            Msg = textBox1.Text;
        	return Msg;
        }
        
        private void IconToBitmap(object sender, PaintEventArgs e)
		{
		    // Construct an Icon.
		    Icon icon1 = new Icon(SystemIcons.Exclamation, 48, 48);
		
		    // Call ToBitmap to convert it.
		    Bitmap bmp = icon1.ToBitmap();
		
		    // Draw the bitmap.
		    e.Graphics.DrawImage(bmp, new Point(0, 0));
        }
		
		private void TextBox1KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter) {
				Msg = textBox1.Text;
				this.Close();
			}
		}
	}
}
